package com.carb.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.carb.enums.CommonDeleted;
import com.carb.enums.CommonStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 服务项目实体类
 * </p>
 *
 * @author XuChaoyang
 * @since 2025-01-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_project")
@Schema(description = "服务项目表")
public class Project implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "服务项目id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "服务项目名称")
    private String name;

    @Schema(description = "服务项目类型id")
    private Long projectTypeId;

    @Schema(description = "服务项目价格 (单位为分)")
    private Integer price;

    @Schema(description = "服务项目状态 (禁用, 启用)")
    private CommonStatus status;

    @Schema(description = "服务项目描述")
    private String description;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除 (未删除, 已删除)")
    private CommonDeleted deleted;

}
